package entity;

/**
 * @Author Yenchingcheng
 * @Date 2023/6/19 15:23
 * @Description
 **/
public class DivideCalculator implements Calculator{
    @Override
    public Double calculate(double number1, double number2) {
        System.out.println("进行除法计算：");
        System.out.println(number1 + "/" + number2 + "=");
        if(number2 == 0){
            System.out.println("除数为0.");
            return null;
        }else {
            return number1 / number2;
        }
    }
}
